package com.ruoyi.human.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.human.mapper.AdverseEventReportMapper;
import com.ruoyi.human.domain.AdverseEventReport;
import com.ruoyi.human.service.IAdverseEventReportService;

/**
 * 不良事件报告Service业务层处理
 * 
 * @author gw
 * @date 2025-01-06
 */
@Service
public class AdverseEventReportServiceImpl implements IAdverseEventReportService 
{
    @Autowired
    private AdverseEventReportMapper adverseEventReportMapper;

    /**
     * 查询不良事件报告
     * 
     * @param eventId 不良事件报告主键
     * @return 不良事件报告
     */
    @Override
    public AdverseEventReport selectAdverseEventReportByEventId(Long eventId)
    {
        return adverseEventReportMapper.selectAdverseEventReportByEventId(eventId);
    }

    /**
     * 查询不良事件报告列表
     * 
     * @param adverseEventReport 不良事件报告
     * @return 不良事件报告
     */
    @Override
    public List<AdverseEventReport> selectAdverseEventReportList(AdverseEventReport adverseEventReport)
    {
        return adverseEventReportMapper.selectAdverseEventReportList(adverseEventReport);
    }

    /**
     * 新增不良事件报告
     * 
     * @param adverseEventReport 不良事件报告
     * @return 结果
     */
    @Override
    public int insertAdverseEventReport(AdverseEventReport adverseEventReport)
    {
        return adverseEventReportMapper.insertAdverseEventReport(adverseEventReport);
    }

    /**
     * 修改不良事件报告
     * 
     * @param adverseEventReport 不良事件报告
     * @return 结果
     */
    @Override
    public int updateAdverseEventReport(AdverseEventReport adverseEventReport)
    {
        return adverseEventReportMapper.updateAdverseEventReport(adverseEventReport);
    }

    /**
     * 批量删除不良事件报告
     * 
     * @param eventIds 需要删除的不良事件报告主键
     * @return 结果
     */
    @Override
    public int deleteAdverseEventReportByEventIds(Long[] eventIds)
    {
        return adverseEventReportMapper.deleteAdverseEventReportByEventIds(eventIds);
    }

    /**
     * 删除不良事件报告信息
     * 
     * @param eventId 不良事件报告主键
     * @return 结果
     */
    @Override
    public int deleteAdverseEventReportByEventId(Long eventId)
    {
        return adverseEventReportMapper.deleteAdverseEventReportByEventId(eventId);
    }
}
